<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
    <div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#"   onclick="loadDiv('mainCenterDiv','${ctx}/nurse/nurseTempItemDict/index')">护理项目字典列表</a>
                </li>
                <li>
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/nurse/nurseTempItemDict/form')">护理项目字典添加</a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="table-responsive no-border">
                        <div class="datatable-top">
                            <div class="pull-left">
                            	<form:form id="searchForm" modelAttribute="nurseTempItemDict"  onsubmit="return loadDivForm('mainCenterDiv','searchForm','${ctx}/nurse/nurseTempItemDict/index');" method="post" class="form-inline">
                                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                    <label>类型代码 ：</label>
                                    <form:select id="classCode" path="classCode" class="form-control" onchange="javascript:$('#searchForm').submit()">
                                        <form:option value="" label="全部"/>
                                        <form:options items="${fns:getDictList('NURSE_CLASS_DICT')}" htmlEscape="false"
                                                      itemValue="value" itemLabel="label"/>
                                    </form:select>
                                    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                </form:form>
                            </div>
                        </div>
                        <table id="contentTable" class="table table-bordered mg-t datatable">
                            <thead>
                                <tr>
                                    <th>护理类型</th>
                                    <th>项目代码</th>
                                    <th>项目名称</th>
                                    <th>护理人群</th>
                                    <th>单位</th>
                                    <%--<th>科室</th>--%>
                                    <th>病区</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <c:forEach items="${page.list}" var="nurseTempItemDict">
                                <tr>
                                    <td> ${fns:getDictLabel(nurseTempItemDict.classCode, 'NURSE_CLASS_DICT', '')}</td>
                                    <td> ${nurseTempItemDict.vitalCode}</td>
                                    <td> ${nurseTempItemDict.vitalSigns}</td>
                                    <td> ${fns:getDictLabel(nurseTempItemDict.nurseGroups, 'NURSE_GROUPS', '')}</td>
                                    <td> ${fns:getDictLabel(nurseTempItemDict.unit, 'NURSE_ITEM_UNIT_DICT', '')}</td>
                                    <%--<td> ${fns:getDeptName(nurseTempItemDict.deptId, '')}</td>--%>
                                    <td> ${fns:getDeptName(nurseTempItemDict.wardCode, '')}</td>
                                    <td>
                                        <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/nurse/nurseTempItemDict/form?id=${nurseTempItemDict.id}')" class="btn btn-success btn-xs">修改</a>
                                        <a href="#"  class="applyBt btn btn-danger btn-xs" onclick="confirmExtend('确认要删除该护理项目字典吗？',function(){delLoad('mainCenterDiv','${ctx}/nurse/nurseTempItemDict/delete?id=${nurseTempItemDict.id}','${ctx}/nurse/nurseTempItemDict/index?classCode=${classCode}')})">删除</a>
                                    </td>
                                </tr>
                            </c:forEach>
                        </table>
                        <div class="pagination">${page}</div>
                    </div>
                </div>
            </section>
        </div>
    </div>